Views [dbo].[vReceiptReport]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Created3:38:30 PM Friday, January 07, 2011
Last Modified1:49:21 PM Thursday, September 22, 2011
Columns
Name
ReceiptKey
ReceiptNumber
IssuedOn
IsNumberAutoGenerated
Notes
ReceiptLineDescription
ReceiptLineKey
ReceiptLineAmount
ReceiptTitle
ReceiptTypeDesc
ID
FullName
ContactAddress
SQL Script
CREATE VIEW [dbo].[vReceiptReport]
AS
SELECT DISTINCT
                      R.ReceiptKey, R.ReceiptNumber, R.IssuedOn,  R.IsNumberAutoGenerated, R.Notes, RL.LineDescription AS ReceiptLineDescription, RL.ReceiptLineKey,
                      RL.ReceiptedAmount AS ReceiptLineAmount, RTR.ReceiptTitle, RTR.ReceiptTypeDesc, CM.ID, CM.FullName,
                      AM.FormattedAddress AS ContactAddress
FROM         dbo.ReceiptMain R LEFT OUTER JOIN
                      dbo.ReceiptLine RL ON R.ReceiptKey = RL.ReceiptKey LEFT OUTER JOIN
                      dbo.ReceiptTypeRef RTR ON R.ReceiptTypeKey = RTR.ReceiptTypeKey LEFT OUTER JOIN
                      dbo.ContactMain CM ON R.IssuedToContactKey = CM.ContactKey LEFT OUTER JOIN
                      dbo.FullAddress FA ON CM.ContactKey = FA.ContactKey LEFT OUTER JOIN
                      dbo.AddressMain AM ON FA.PhysicalAddressKey = AM.AddressKey

GO
Uses